<!--决算页面-->
<template>
    <view class="account-page" ref="myContent" id="zrJueSuanInfo">
        <SettlementDetails :prjId="attachMentInfo.prjId" />
        <AttachMentInfo :attachMentObj="attachMentInfo" />
        <JnApprovalDetail :processInstID="attachMentInfo.processInstId" />
    </view>
</template>

<script>
import AttachMentInfo from "@/inspur/attachmentinfo/index.vue"
import JnApprovalDetail from "@/component/jn/JnApprovalDetail.vue";
import SettlementDetails from '@/inspur/settlement/components/settlementDetails.vue'
export default {
    name: "Accounts",
    components: {
        AttachMentInfo,
        JnApprovalDetail,
        SettlementDetails
    },
    data() {
        return {
            // 附件需要的参数  综合查询
            attachMentInfo: {
            },
        }
    },
    //监听页面加载
    onLoad(option) {
        this.attachMentInfo = {
            ...option,
            prjStage: 'Q'
        }
        uni.setStorageSync("sysToken", option.sysToken)
        uni.setNavigationBarTitle({
            title: '项目详情'
        });
    },
    mounted() {
        // 监听高度变化
        const div = document.querySelector('#zrJueSuanInfo');
        const url = window.location.protocol + '//' + window.location.host;
        // 创建一个ResizeObserver实例，并提供一个回调函数
        const resizeObserver = new ResizeObserver(entries => {
            for (let entry of entries) {
                const { height } = entry.contentRect;
                console.log(height, '决算编制发送高度')
                window.parent.postMessage({ type: 'jieSuanHeight', height: height }, url)
            }
        });
        resizeObserver.observe(div)
    }
}
</script>

<style>
@import "@/common/common-ui.css";
</style>
<style scoped lang="scss">
.account-page {
    padding: 20rpx 20rpx 160rpx;
}
</style>